import AudioManger from "../common/AudioManger";


export default function (store){
    // 初始化音乐
    initAudio(store);

}

function initAudio(store){
    let musicUrl = store.state?.music?.musicUrl;
    let musicCurrentTime = store.state?.music?.musicCurrentTime;
    AudioManger.setSrc(musicUrl);
    AudioManger.setCurrentTime(musicCurrentTime / 1000);
    store.commit("music/setMusicIsPlay",false);
    store.commit("music/setMusicLoading",false);
    store.dispatch("music/resetCommentData");
}